package com.sz.biz.logistics.ord.enums;

import com.sz.common.base.dao.ext.IEnum;

/**
 * Package: com.sz.biz.logistics.ord.enums<br>
 * Function: 物流信息编码对应的服务-供应商类型
 * Author: yanhong.xiao.<br>
 * Date: 2017-05-23 17:27:00.
 */
public enum OrderStatusToServiceTypeEnum implements IEnum {
   // 操作2  揽收 3 干线4 海关5   配送6
    RECEGOOD("3", "ST001"),//揽货服务
    MAINLINE("4","ST004"),//干线服务
    CUSTOMS("5","ST003"),//海关服务
    DISPACTCHING("6","ST005");//配送服务
    private String code;
    private String name;

    OrderStatusToServiceTypeEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    @Override
    public String getCode() {
        return this.code;
    }

    @Override
    public String getName() {
        return this.name;
    }

    public static OrderStatusToServiceTypeEnum valueOfEnum(String code) {
        OrderStatusToServiceTypeEnum[] iss = values();
        for (OrderStatusToServiceTypeEnum cs : iss) {
            if (cs.getCode().equals(code)) {
                return cs;
            }
        }
        return null;
    }
}
